import { ConstantEnum } from '@libs/common/enums';

import { SysUser } from './entities/sys-user.entity';

export const ProviderKey = 'SYS_USER_REPOSITORY';
export const Providers = [
  {
    provide: ProviderKey,
    useFactory: (AppDataSource) => AppDataSource.getRepository(SysUser),
    inject: [ConstantEnum.DB_DATA_SOURCE],
  },
];
